<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<head><title>BirthdayReminder | #{msg.loginTitle}</title>
<link href="css/mystyles.css" rel="stylesheet" type="text/css"/>
</head>
<h:body>
<f:view locale="#{languageBean.activeLocale}">
<div align="center">
<h1>#{msg.loginTitle}</h1>
<fieldset>
<legend>#{msg.loginLegend}</legend>
<h:form id="myloginform">
<h:messages styleClass="error" globalOnly="true"/>
<table>
  <tr>
  <td>#{msg.loginUsername}</td><td><h:inputText id="username" required="true" requiredMessage="#{msg.loginUsernameError}"/></td>
  <td><h:message for="username" styleClass="error" /></td>
  </tr> 
  <tr>
  <td>#{msg.loginPassword}</td><td><h:inputSecret id="password" required="true" requiredMessage="#{msg.loginPasswordError}"/></td>
  <td><h:message for="password" styleClass="error" /></td>
  </tr>
  <tr><td><h:commandButton value="#{msg.loginButton}" action="#{loginBean.doLogin}"/></td>  <!-- tries do login the User -->
  <td>#{msg.loginRegisterq}<h:commandLink value="#{msg.loginRegisterl}" action="#{loginBean.navRegistration}" immediate="true"/></td>
  </tr>
  <tr>
  <td></td>
  <td>
  <h:commandButton id="flag_de" actionListener="#{languageBean.useDe}" immediate="true" image="#{languageBean.numLocale == 1 ? 'pics/flag_de_active.png' : 'pics/flag_de2.png'}" />
  <h:commandButton id="flag_en" actionListener="#{languageBean.useEn}" immediate="true" image="#{languageBean.numLocale == 0 ? 'pics/flag_en_active.png' : 'pics/flag_en2.png'}" />
  </td>
  </tr>
</table>
</h:form>
</fieldset>
</div>
</f:view>
</h:body>
</html>